package com.hnkywl.sts.action.flow.endState;

import com.hnkywl.sts.entity.cggl.Zjbcd;
import com.hnkywl.sts.service.jsgl.ZjbcdService;
import com.hnkywl.sts.util.ApplicationInstance;
import org.jbpm.api.listener.EventListener;
import org.jbpm.api.listener.EventListenerExecution;

/**
 * Created by Jerry on 13-10-28.
 */
public class EndZjbcdState implements EventListener {
    @Override
    public void notify(EventListenerExecution execution) throws Exception {
        // 改变状态  ytj--->ysp
        ZjbcdService zjbcdService = ApplicationInstance.createZjbcdService();
        Zjbcd zjbcd = zjbcdService.findZjbcdDetailByProcessInstance(execution.getProcessInstance().getId());
        zjbcd.setZt("ysp");
        zjbcdService.saveZjbcd(zjbcd);
    }
}
